#pragma once

#if defined(__cplusplus)
#define BeginCLink  extern "C" { 
#define EndCLink }
#else
#define BeginCLink
#define EndCLink
#endif

#ifdef _EX_MATH_EXPORT
#define EXPORTAPI __declspec(dllexport)
#else
#define EXPORTAPI __declspec(dllimport)
#endif //_EX_MATH_EXPORT

BeginCLink

namespace ex
{
	class EXPORTAPI exmath
	{
	private:
		int _k;
	public:
		exmath() :exmath(100) {}
		exmath(int k) :_k(k) {}
		~exmath() {}
		int Add(int a, int b) { return a * _k + b; }
		int Mul(int a, int b) { return a * _k * b; }
	};
	class stmath
	{
	public:
		EXPORTAPI int Add(int a, int b) { return a * 100 + b; }
		EXPORTAPI int Mul(int a, int b) { return a * 100 * b; }
	};
}
EndCLink